Skip to content

GH-1550: [JDBC] Fix trustStore using only its first certificate - #1555

Open
fredjoonpark wants to merge 1 commit into
apache:mainfrom
fredjoonpark:trust-store-all-certificates
Open

fredjoonpark wants to merge 1 commit into
apache:mainfrom
fredjoonpark:trust-store-all-certificates

Conversation

@fredjoonpark

@fredjoonpark fredjoonpark commented Dec 4, 2026 •

Copy link
Copy Markdown
Contributor

What's Changed

With trustStore set, the driver trusted only the first certificate entry of the store: ClientAuthenticationUtils.getCertificateStream ended in getSingleCertificateInputStream. A server whose chain ended at any other CA in the store failed with "unable to find valid certification path to requested target".

getCertificateStream now goes through getCertificatesInputStream, as useSystemTrustStore does, so every certificate entry is trusted. A store without certificate entries still fails with "Keystore did not have a certificate."

Closes #1550.

With trustStore set, the driver trusted only the first certificate entry of
the store: ClientAuthenticationUtils.getCertificateStream ended in
getSingleCertificateInputStream. A server whose chain ended at any other CA
in the store failed with "unable to find valid certification path to
requested target".

getCertificateStream now goes through getCertificatesInputStream, as
useSystemTrustStore does, so every certificate entry is trusted. A store
without certificate entries still fails with "Keystore did not have a
certificate."
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[JDBC] trustStore trusts only the first certificate entry in the store

1 participant